<template>
  <div>
    <h3>请完善订单</h3>
    <el-row>
      <el-col :span="2">
        收货人：
      </el-col>
      <el-col :span="4">
        <el-input v-model="order.receiver"></el-input>
      </el-col>
    </el-row>
    <el-row>
      <el-col :span="2">
        收货地址：
      </el-col>
      <el-col :span="4">
        <el-input v-model="order.addr"></el-input>
      </el-col>
    </el-row>
    <el-row>
      <el-col :span="2">
        电话：
      </el-col>
      <el-col :span="4">
        <el-input v-model="order.phone"></el-input>
      </el-col>
    </el-row>
    <el-button type="primary" @click="orderAdd()">提交订单</el-button>
  </div>
</template>

<script>
import axios from "axios";

export default {
  data() {
    return {
      order: {}
    }
  },
  methods: {
    orderAdd() {
      axios.get("/project/order/add", {params: this.order})
          .then(resp => {
            if (resp.data == "ok") {
              this.$router.push("/success");
            }
          })
    }
  }
}
</script>

<style scoped>

</style>